<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title id='Description'>Biểu đồ danh thu</title>
    <link rel="stylesheet" href="{{base_url()}}jqwidgets-ver2.4/jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="{{base_url()}}jqwidgets-ver2.4/scripts/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="{{base_url()}}jqwidgets-ver2.4/jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="{{base_url()}}jqwidgets-ver2.4/jqwidgets/jqxdata.js"></script>
    <script type="text/javascript" src="{{base_url()}}jqwidgets-ver2.4/jqwidgets/jqxchart.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var base_url="{{base_url()}}";
            // prepare chart data as an array
            var source ={{$configs["source"]}};
            // prepare jqxChart settings
            var settings = {
                title: "Tỷ lệ doanh thu 4 quí năm {{$configs["year"]}}",
                description: "(Tổng doanh thu ${{number_format($configs["total"])}})",
                enableAnimations: true,
                showLegend: true,
//                legendPosition: { left: 520, top: 140, width: 100, height: 100 },
//                padding: { left: 5, top: 5, right: 5, bottom: 5 },
                legendLayout: { left: 100, top: 120, width: 300, height: 200, flow: 'vertical' },
                padding: { left: 5, top: 5, right: 5, bottom: 5 },
                titlePadding: { left: 0, top: 0, right: 0, bottom: 10 },
                source: source,
                colorScheme: 'scheme02',
                seriesGroups:
                    [
                        {
                            type: 'donut',
                            showLabels: true,
                            series:
                                [
                                    {
                                        dataField: 'Pecent',
                                        displayText: 'Quarter',
                                        labelRadius: 100,
                                        initialAngle: 15,
                                        radius: 130,
                                        innerRadius: 50,
                                        centerOffset: 0,
                                        formatSettings: { sufix: '%', decimalPlaces: 1 }
                                    }
                                ]
                        }
                    ]
            };
            // setup the chart
            $('#jqxChart').jqxChart(settings);
        });
    </script>
</head>
<body class='default' style="margin: 0;padding: 0">
    <div id='jqxChart' style="width:910px; height:464px">
    </div>
</body>
</html>